<!-- Front page for Marketplace -->
<?php 
 session_start();
  if (!isset($_SESSION['check']) || $_SESSION['check'] != true){
    header("location: index.php");
    /* Make sure that code below does not get executed when we redirect. */
    exit;
  }
?>

<!DOCTYPE HTML>
<html>
  <head>
    <title>Movie DB</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
    <link href="datepicker/css/datepicker.css" rel="stylesheet">
    <script src="datepicker/js/bootstrap-datepicker.js"> </script>
    <script src="script/jquery-1.9.1.min.js"> </script>
    <script src="bootstrap/js/bootstrap.min.js"> </script>
    <script src="script/jquery.validate.js"> </script>

    

    <style type="text/css">
      .header {
        margin-top:20px;
      }

      #front-search-form {
        padding-top: 10px;
        border-style: solid;
        border-width: 2px;
      }

      img {
        height: 330px;
      }

      div.wrapper {
        position: relative;
      }
      div.description{  
         position:absolute; /* absolute position (so we can position it where we want)*/  
    bottom:30px; /* position will be on bottom */  
    left:0px;  
    width:100%;  
    /* styling bellow */  
    background-color:black;  
    font-family: 'tahoma';  
    font-size:15px;  
    color:white;  
    opacity:0.6; /* transparency */  
    filter:alpha(opacity=60); /* IE transparency */  
} 
     
    </style>
    <script>
   
      $(document).ready(function() {
       
      });

      

    </script>
  </head>
  <body>
    <div class="container">
      <!--marketplace banner photo -->
      <div class="header row-fluid">
        <div class="span7">
          <h1>Online Movie Rental System
            <small> CS2102 </small>
          </h1>
        </div>
        <div clas="span5">
        
        

          <div class=" pull-right" style="margin-top:20px;">
              <a class="btn btn-success" onclick="loadLoginModal(); return false;" style="<?php if($_SESSION['check'] == true) echo 'display: none'; ?>"> Log in </a>  
              <a class="btn" onclick="loadSignupModal(); return false;" style="<?php if($_SESSION['check'] == true) echo 'display: none'; ?>"> register </a> 
              <a href="#"><?php if(isset($_SESSION['check']) && $_SESSION['check'] == true) echo "User: "."$_SESSION[name]"; ?></a>
              <a class="btn" href="logout.php" style="<?php if (!isset($_SESSION['check']) || $_SESSION['check'] != true) echo 'display: none'; ?>"> log out </a> 
          </div>

          
        </div>
      </div>

      <div class="navbar">
        <div class="navbar-inner">
          <a class="brand" href="#">MOVIES!</a>
          <ul class="nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#">My bookings</a></li>
            <li><a href="#">All Movies</a></li>
          </ul>
        </div>
      </div>


      <!-- signin form -->

      <div class="row-fluid">
        <div class="span3">
              <img src="http://web.enavu.com/wp-content/uploads/pic.png">
              <button class="btn">Book</button>
           
        </div>
        <div class="span3">
              <img src="http://www.yn.xinhuanet.com/ent/2010-01/01/xin_203010701105023408021.jpg">
              <button class="btn">Book</button>
        
        </div>
        <div class="span3">
              <img src="http://www.yn.xinhuanet.com/ent/2010-01/01/xin_203010701105023408021.jpg">
              <button class="btn">Book</button>
        
        </div>
          <div class="span3 wrapper">
              <img src="http://i2.sinaimg.cn/edu/2013/0308/U3835P42DT20130308135707.jpg">
               <div class="description">
               <p>
                THis and athenadfdfadf
               </p>
               </div>
              <button class="btn">Book</button>
        </div>
      </div>

     
      </div>
  </body>
</html>
